//路由
const authRouters = [
    {
        path: '/',
        name: 'SysLayout',
        component: () => import('@/components/SysLayout'),
        meta:{title:'首页'},
        redirect: '/sys',
        children:[
            {
                path:'/sys',
                name:'sys',
                component:() => import('@/components/PageView'),
                meta:{title:'系统管理',icon:'setting',permission:'sys'},
                redirect:'/sys/user',
                children:[
                    {
                        path: '/sys/user',
                        name: 'User',
                        component: () => import('@/components/sys/User'),
                        meta:{permission:'sys.user',title:'用户管理',icon:'user'}
                    },
                    {
                        path: '/sys/role',
                        name: 'Role',
                        component: () => import('@/components/sys/Role'),
                        meta:{permission:'sys.role',title:'角色管理',icon:'team'}
                    },
                    {
                        path: '/sys/menu',
                        name: 'Menu',
                        component: () => import('@/components/sys/Menu'),
                        meta:{permission:'sys.menu',title:'菜单管理',icon:'bars'}
                    }
                ]
            },
            {
                path:'/product',
                name:'product',
                component:() => import('@/components/PageView'),
                meta:{title:'商品管理',icon:'shopping'},
                redirect:'/product/product',
                children:[
                    {
                        path: '/product/resource',
                        name: 'Resource',
                        component: () => import('@/components/product/Resource'),
                        meta:{title:'资源管理',icon:'folder-open'}
                    },
                    {
                        path: '/product/type',
                        name: 'type',
                        component: () => import('@/components/product/Type'),
                        meta:{title:'商品类型',icon:'profile'}
                    }
                ]
            }
        ]
    },
    {
        path: '*', redirect: '/404', hidden: true
    }
]
export default authRouters
